package Day33;

public class Employee {
    private String name;
    private double salary;

    public Employee(String name, double salary) {
        this.name = name;
        this.salary = salary;
    }

    public Employee() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
    public double  GetSalary(double salary){
        return 0;
    }
}

class Employer extends Employee{
    public Employer(String name, double salary) {
        super(name, salary);
    }

    public Employer(){

    }

    public void work(){
        System.out.println(super.getName() + "员工正在工作");
    }
    @Override
    public double  GetSalary(double salary){
        return salary * 12;
    }
}

class Manger extends Employee {
    private double bonus;

    public Manger(String name, double salary, double bonus) {
        super(name, salary);
        this.bonus = bonus;
    }

    public Manger(double bonus) {
        this.bonus = bonus;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    public void wwork(){
        System.out.println(super.getName() + " 经理正在工作");
    }

    @Override
    public double GetSalary(double salary){
        return salary * 12 +bonus;
    }
}
